package com.technique.api.account.controller;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.technique.api.account.dao.AccountDao;
import com.technique.api.account.dao.PlaceRegisterDao;
import com.technique.api.dao.entity.Account;
import com.technique.api.dao.entity.PlaceRegister;

@Controller
@RequestMapping("/account")
public class AccountController {

	@Autowired
	private AccountDao accountDao;
	
	
	@ResponseBody
	@RequestMapping("/register")
	public String register(
			String name,
			String passWord,
			String verifyCode){
		Account account = new Account();
		account.setPhone(name);
		account.setPassword(passWord);
		account.setState(1);
		accountDao.insert(account);
		
		return "/business/index";//成功注册，保存session数据，返回登陆首页
	}
}
